package com.sicnu.resources.bean.converter;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.sicnu.resources.enums.ResourceTypeEnum;


/**
 * @author 86133
 * @version 1.0
 * @since 2024/12/19 09:43
 */
public class ResourceTypeConverter implements Converter<String> {
    @Override
    public WriteCellData<?> convertToExcelData(
            WriteConverterContext<String> context) {
        return new WriteCellData<>(
                ResourceTypeEnum.getTypeByCode(context.getValue()));
    }
}
